Scheduling & Events
Scheduling
- Quartz-backed schedules per workflow (CRON string in
workflow.schedule). - Endpoints:
GET /v1/vaiworkflow/loadSchedulesto reload. - Service:
scheduleWorkflow(Workflow)registers jobs and triggers.
Event-driven triggers
- Register:
POST /v1/vaiworkflow/{workflowId}/triggerswith{ "eventType": "order.created" }. - Publish:
POST /v1/vaiworkflow/eventwith{ "type": "order.created", "payload": {...} }. - Runtime maps event type to workflows and starts the execution asynchronously.
Usage pattern
- Combine schedules for periodic runs and events for instant reactions.
WorkflowEventBuswraps Spring’s ApplicationEventPublisher.